package com.example.merchant.controller;

import com.example.common.BaseContext;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("merchant")
@Slf4j
public class MerchantController {
    @GetMapping("index")
    public void index(){
        log.info("merchant微服务下的MerchantController中的index方法被请求了");
        Object context = BaseContext.getContext();
        String name = Thread.currentThread().getName();
        log.info("merchant的线程名称：{}",name);
        log.info("context:{}",context);
    }
}
